//
//  YHOptionTableViewItemTwoBoxs.m
//  ScriptKill
//
//  Created by 林宁宁 on 2021/4/28.
//  Copyright © 2021 优智汇. All rights reserved.
//

#import "YHOptionTableViewItemTwoBoxs.h"
#import "YHHUD.h"

@implementation YHOptionTableViewItemTwoBoxs

-(void)yh_commonInit{
    [super yh_commonInit];
    
    self.centerTitle = @"-";
    self.boxWidth = 60;
    self.boxHeight = 30;
}

-(void)setBoxValue1:(NSString *)boxValue1{
    _boxValue1 = boxValue1;
    [self resetPickerContentShow];
}

-(void)setBoxValue2:(NSString *)boxValue2{
    _boxValue2 = boxValue2;
    [self resetPickerContentShow];
}

- (void)resetPickerContentShow{
    self.pickerContents = [@[NullShow(self.boxValue1),NullShow(self.boxValue2)] componentsJoinedByString:@","];
}

-(BOOL)isAviableToHint{
    if(IsNull(self.boxValue1)){
        YHHUDMsg(self.boxPlaceholder1);
        return NO;
    }
    if(!self.hiddenBox2){
        if(IsNull(self.boxValue2)){
            YHHUDMsg(self.boxPlaceholder2);
            return NO;
        }
    }
    return YES;
}

@end
